package com.httpsender;

import android.widget.TextView;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.zip.DataFormatException;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONObject;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;



public class HTTPsenderActivity extends Activity {
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView(this);
        //tv.setText("Hello, Danielle\nAll this is for you!");
        tv.setText(getContent());
        setContentView(tv);
    }

    private String getContent(){
    	
    	MBLevel mylevel = GameManagement.download_MBLevel("sPark", "Stan");
    	
    	/*
    	MBLevel test = new MBLevel();
    	HighScore[] scores;
    	
    	try{
    		scores = GameManagement.download_HighScores(test);
    	}catch(DataFormatException e){
    		return (e.toString());
    	}
    	
    	String retVal = "High Scores \n";
    	for(int i = 0; i < scores.length; i ++)
    		retVal += scores[i].print() + "\n";
    	*/
    	
    	
    	return mylevel.toString();
    }
    
      
}